/*
 * @Author: wwssaabb
 * @Date: 2021-09-07 15:34:59
 * @LastEditTime: 2021-09-17 16:20:12
 * @FilePath: \gshop-client\src\router\index.ts
 */
import {
  createRouter,
  // createWebHistory,
  createWebHashHistory,
} from "vue-router";

export default createRouter({
  history: createWebHashHistory(),
  routes: [
    {
      path: "/",
      component: () => import("../views/Home.vue"),
    },
    {
      path: "/home",
      component: () => import("../views/Home.vue"),
    },
    {
      path: "/search",
      component: () => import("../views/Search.vue"),
    },
    {
      path: "/order",
      component: () => import("../views/Order.vue"),
    },
    {
      path: "/profile",
      component: () => import("../views/Profile.vue"),
    },
    {
      path: "/login",
      component: () => import("../views/Login.vue"),
    },
    {
      path: "/shop",
      component: () => import("../views/Shop/Shop.vue"),
      children: [
        {
          path: "/shop/",
          component: () => import("../views/Shop/components/Menu.vue"),
        },
        {
          path: "/shop/menu",
          component: () => import("../views/Shop/components/Menu.vue"),
        },
        {
          path: "/shop/comments",
          component: () => import("../views/Shop/components/Comments.vue"),
        },
        {
          path: "/shop/info",
          component: () => import("../views/Shop/components/info.vue"),
        },
      ],
    },
  ],
});
